<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
  <head>
    <title></title>
    <link rel="stylesheet" type="text/css" href="${path}/css/editTable.css">
    
    <script type="text/javascript">
    	function check(){
    		var sp_code_id = document.getElementById("sp_code_id").value;
     		if("" == sp_code_id || "0" == sp_code_id){
     			alert("业务短号码为空");
     			return false;
     		}
     		
     		var day_limit = document.getElementById("day_limit").value;
     		if("" == day_limit){
     			alert("请输入日限");
     			return false;
     		}
     		
     		var month_limit = document.getElementById("month_limit").value;
     		if("" == month_limit){
     			alert("请输入月限");
     			return false;
     		}
    	}
    </script>
  </head>
  <body>
    <div>
    	<form id="modifyBusinessLimitCodeForm" name="modifyBusinessLimitCodeForm" method="post" action="${path }/limitCode/updateBusinessLimitCode.action" onsubmit="return check();">
    		<p>修改短号码省份管控信息</p>
    		<table>
    			<tr>
    				<td>业务短号码</td>
    				<td>
    					<input type="hidden" id="sp_code_id" name="limitCodeVo.sp_code_id" value="${limitCodeVo.sp_code_id }" />
    					<c:if test="${configBusinessVoList != null && fn:length(configBusinessVoList) > 0 }">
		    				<c:forEach items="${configBusinessVoList }" var="configBusinessVo" varStatus="i">
		    					<c:if test="${configBusinessVo.id == limitCodeVo.sp_code_id }">
		    						<input type="text" id="sp_code" name="limitCodeVo.sp_code" value="${configBusinessVo.sp_code }" readonly="readonly" />
		    					</c:if>
		    				</c:forEach>
		    			</c:if>
    				</td>
    			</tr>
    			<tr>
    				<td>管控省份</td>
    				<td>
    					<input type="hidden" id="province" name="limitCodeVo.province" value="${limitCodeVo.province }" />
    					<input type="text" value="<c:if test="${limitCodeVo.province != '' }">${limitCodeVo.province }</c:if><c:if test="${limitCodeVo.province == '' }">全部</c:if>" readonly="readonly" />
    				</td>
    			</tr>
    			<tr>
    				<td>日限(元)</td>
    				<td>
    					<input type="text" id="day_limit" name="limitCodeVo.day_limit" value="" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项</span>
    				</td>
    			</tr>
    			<tr>
    				<td>月限(元)</td>
    				<td>
    					<input type="text" id="month_limit" name="limitCodeVo.month_limit" value="" />
    					<span style="color: red;size: 2px;">&nbsp;*必填项</span>
    				</td>
    			</tr>
    			<tr>
    				<td colspan="2">
    					<input type="submit" name="submit" value="确认" />
    				</td>
    			</tr>
    		</table>
    	</form>
    </div>
  </body>
</html>